package com.aos.erp.schools.model.common;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @program: erp
 * @description: 数据字典
 * @author: tanzhiyu
 * @create: 2018-11-09 18:44
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("数据字典")
@TableName("t_common_dict")
public class Dict  implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value="主键ID",hidden=true)
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    @ApiModelProperty("父级ID")
    @TableField("parent_id")
    private Long parentId;

    @ApiModelProperty("code")
    @TableField("code")
    private String code;

    @ApiModelProperty("名称")
    @TableField("name")
    private String name;

    @ApiModelProperty("类别")
    @TableField("type")
    private Integer type;

    @ApiModelProperty(value = "创建时间", hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("created")
    private Date created;

    @ApiModelProperty(value = "修改时间",hidden=true)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("updated")
    private Date updated;

}
